fix(scripts): only swallow ENOENT in rees-coverage lcov post-process (#7771)#7812
Closed
RealDiligent wants to merge 2 commits into
Closed
fix(scripts): only swallow ENOENT in rees-coverage lcov post-process (#7771)#7812RealDiligent wants to merge 2 commits into
RealDiligent wants to merge 2 commits into
Conversation
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
…SONbored#7771) Narrow the bare catch to ENOENT on read so write failures surface as real CI errors. Export normalizeLcovSfPaths for unit tests; guard main() behind import.meta.url check. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
This repository reviews pull requests one-shot: the PR must be correct as originally opened. Pushing an additional commit closes it automatically instead of restarting review — open a fresh pull request with every fix included. |
Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7812 +/- ##
=======================================
Coverage 88.57% 88.57%
=======================================
Files 725 725
Lines 76409 76409
Branches 22762 22762
=======================================
Hits 67682 67682
Misses 7681 7681
Partials 1046 1046
Flags with carried forward coverage won't be shown. Click here to find out more. |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ees-coverage.mjs used a bare catch {} around lcov post-processing, which swallowed any error — including real writeFileSync failures on an existing report. Only ENOENT (report not generated yet) should be ignored; CI's downstream verify step handles that case.
Fix: extract
ormalizeLcovSfPaths(), re-throw non-ENOENT errors, guard main() behind import.meta.url so tests can import the helper.
Tests
Closes #7771